package com.ethink.framework.mybatis.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * mybatis-plus 配置
 *
 * @author yunduo
 * @date 2020-06-01
 */
@Data
@ConfigurationProperties(prefix = "ethink.framework.mybatis-plus")
@Component
public class MybatisPlusProperties {
    /**
     * 是否开启了插入填充
     */
    private Boolean enableInsertFill = true;
    /**
     * 是否开启了更新填充
     */
    private Boolean enableUpdateFill = true;

    /**
     * 是否开启多租户
     */
    private Boolean enableTenant = false;

    /**
     * 配置不进行多租户隔离的表名
     */
    private List<String> ignoreTables = new ArrayList<>();

    /**
     * 配置不进行多租户隔离的sql
     * 需要配置mapper的全路径如：com.semir.system.mapper.SysUserMapper.pageQuery
     */
    private List<String> ignoreSqls = new ArrayList<>();
}
